package export.monster
{
	import base.BaseMonster;
	
	import com.game.manager.AnimationManager;
	
	import export.bullet.RegionBullet;
	
	import flash.geom.Rectangle;
	//牛妖
	public class Monster401 extends BaseMonster
	{
		public function Monster401()
		{
			super();
		}
		
		override protected function initBBDC():void
		{
			bbdc = AnimationManager.getAnimation("Monster401Action");
			bbdc.setAction("idle");
			bbdc.turnRight();
			bbdc.addCallBack(onEnterFrame, onActionOver);
			bodyContainer.addChild(bbdc);
		}
		
		override protected function initCollideArea():void
		{
			collideBox = new Rectangle(-30,-90,60,90);
			super.initCollideArea();
		}
		
		override protected function initAttribute():void
		{
			super.initAttribute();
			mavo.attackRange = 150;
		}
		
		override protected function onEnterFrame(action:String, frameCount:int):void
		{
			switch (action)
			{
				case "attack1":
					if(frameCount == 1)
					{
						var b:RegionBullet = new RegionBullet();
						b.setOwner(this);
						b.setHurt(getActionHurt("attack1"));
						b.setDirect(bbdc.getDirect());
						b.setCollideArea(0,-110,110 * bbdc.getDirect(),110);
						b.setAction("Monster401Attack1");
						b.setDestroyInCount(bbdc.frameLeft);
						gc.gameScene.addChild(b);
						magicBulletArray.push(b);
					}
					break;
			}
		}
	}
}/*
package export.monster
{
	import base.BaseMonster;
	
	public class Monster401 extends BaseMonster
	{
		public function Monster401()
		{
			super();
			this.attackBackInfoDict["hit1"] = {
				"hitMaxCount"    : 1,
				"attackBackSpeed": [3, -5],
				"attackInterval" : 4,
				"powerTimes": 1,
				"attackKind"     : "physics"
			};
			this.setAction("idle");
		}
		
		override protected function myIntelligence():void
		{
			if (!this.isAttacking())
			{
				super.myIntelligence();
			}
		}
	}
}*/
